package org.itboys.mobile.entity.mysql.product;


import org.itboys.mongodb.entity.BaseMySqlEntity;

/**
 * 作者：jiangxiong
 * 日期：2016年9月12日
 * 联系方式 ：empty90911@126.com
 * 描述：圣代_商品_分类_一级规格_实体
 */
public class SundayProductCategorySecondStandard extends BaseMySqlEntity {

	private String name;//名称
	private String image;//图片
	private Integer type;//类型 1颜色，2尺寸

	private Long categoryId;//分类Id
	private String categoryName;//分类名称
	private Long firstId;//一级规格ID
	private String firstName;//一级分类名称

	public SundayProductCategorySecondStandard() {
	}

	public SundayProductCategorySecondStandard(long id,String name, String image, Integer type, Long categoryId,  Long firstId) {
		super.setId(id);
		this.name = name;
		this.image = image;
		this.type = type;
		this.categoryId = categoryId;
		this.firstId = firstId;

	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getImage() {
		return image;
	}

	public void setImage(String image) {
		this.image = image;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public Long getCategoryId() {
		return categoryId;
	}

	public void setCategoryId(Long categoryId) {
		this.categoryId = categoryId;
	}

	public String getCategoryName() {
		return categoryName;
	}

	public void setCategoryName(String categoryName) {
		this.categoryName = categoryName;
	}

	public Long getFirstId() {
		return firstId;
	}

	public void setFirstId(Long firstId) {
		this.firstId = firstId;
	}

	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}
	public String  getTypeStr(){
		String typeStr= "";
		if(type==null)return typeStr;

		switch (type) {
			case 1:
				typeStr="颜色";
				break;
			case 2:
				typeStr="尺寸";
				break;
			default:
				break;
		}
		return typeStr;
	}
}
